package com.example.demo.Dao;

import com.example.demo.Model.Userinfo;
import com.example.demo.Model.VO.UserinfoVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


public interface Usermapper {

    @Insert("insert into userinfo(username,password) values(#{username},#{password})")
    int reg( Userinfo userinfo);

    @Select("select * from userinfo where username=#{username}")
    Userinfo GetUserByName(@Param("username") String username);

    @Select("select * from userinfo where id = #{uid}")
    UserinfoVO getUserById(@Param("uid")int uid);
}
